import { ORDC_SET_ORDER_DETAIL, ORDC_CHANGE_MODAL_VISIBLE, ORDC_SET_URGE_RECORD, ORDC_CHANGE_RECORD_MODAL } from './actions';

const initState = {
    orderData: {},
    visible: false,
    recordVisible: false,
    recordData: []
};
const orderDetailState = (state = initState, action) => {
    switch (action.type) {
        case ORDC_SET_ORDER_DETAIL:
            return { ...state, orderData: action.data };
        case ORDC_CHANGE_MODAL_VISIBLE:
            return { ...state, visible: action.option };
        case ORDC_CHANGE_RECORD_MODAL:
            return { ...state, recordVisible: action.option };
        case ORDC_SET_URGE_RECORD:
            return { ...state, recordData: action.data };
        default:
            return state;
    }
}
export default orderDetailState;